<html>
<head>
<title>300px Body</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style2 {color: #000000}
-->
.error_strings{ font-family:Verdana; font-size:10px; color:#660000;}
</style>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (300px Body.jpg) -->
<script language="javaScript" type="text/javascript" src="../calander/calendar.js"></script>
<link href="../calander/calendar.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="../logic/validation/validation.js" type="text/javascript"></script>
<script language="JavaScript" src="../logic/validation/feedback_update.js" type="text/javascript"></script>
<table width="800" height="173" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">
	<tr>
		<td>
			<img src="../images/feedback_update.gif" width="800" height="69" alt=""></td>
	</tr>
	<tr >
	<td height="64" background="../images/2.gif" style="background-repeat:repeat-y"><table width="750" border="0" cellspacing="0" cellpadding="0">
	
	<?php 
	$id=$_GET['edit'];
	$startrow=$_GET['startrow'];
	$tag=$_GET['tag'];
	include'../logic/Classes/db.php';
	
	$x=new Dbconnect();
	
	$con=$x->getConnection();
	
	$result=mysql_query("select sub_gr,related,com_date,com_by,feedback from feedback ",$con) or die(mysql_error());  
	?>
	<?php while($row=mysql_fetch_array($result)){
	
	 $subgr=$row['sub_gr'];
	 $rel=$row['related'];
	 $comby=$row['com_by'];
	 $feed=$row['feedback'];
	 $dt1=$row['com_date'];
	}
	?>
	<Form id="myForm">
	 <?php 
		$x1=new Dbconnect();
		$con=$x1->getConnection();
	 	$result1=mysql_query("select sub_gr from subject_code",$con);
	     ?>
	  
      <tr >
        <td width="95" height="25">&nbsp;</td>
        <td width="181"><div align="right"><strong>Subject Code <span class="style1">*</span> </strong></div></td>
        <td colspan="3"><select name="sltSubgr" id="sltSubgr">
          
		  <?php while($row1=mysql_fetch_array($result1)) {?>
		  <option value="<?php echo $row1['sub_gr'];  ?>" <?php if ($subgr==$row1['sub_gr']) { ?>selected="selected" <?php } ?>><?php echo $row1['sub_gr'];  ?>   </option>
          <?php } ?>
        </select>
          <input name="txtId" type="hidden" id="txtId" value="<?php echo $id ;?>">
          <input name="startrow" type="hidden" id="startrow" value="<?php echo $startrow ;?>">
          <input name="tag" type="hidden" id="tag" value="<?php echo $tag ;?>"></td>
        <td width="175">Required<span class="style1"> <span class="style2">Field </span>* </span></td>
      </tr>
      <tr >
        <td height="19">&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      
      <tr >
        <td height="25">&nbsp;</td>
        <td><div align="right"><strong> Related To <span class="style1">*</span> </strong></div></td>
        <td colspan="3"><select name="sltRel" id="sltRel">
		  
          <option value="Teacher"<?php if ($rel=="Teacher") { ?>selected="selected" <?php } ?>>Teacher</option>
          <option value="Facilities"<?php if ($rel=="Facilities") { ?>selected="selected" <?php } ?>>Facilities</option>
          <option value="Orther" <?php if ($rel=="Orther") { ?>selected="selected" <?php } ?>>Orther</option>
        </select>        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="19">&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="25">&nbsp;</td>
        <td><div align="right"><strong>Commented By <span class="style1">*</span> </strong> </div></td>
        <td colspan="3"><select name="sltComby" id="sltComby">
		
          <option value="Students" <?php if ($rel=="Students") { ?>selected="selected" <?php } ?>>Students</option>
          <option value="Parents" <?php if ($rel=="Parents") { ?>selected="selected" <?php } ?>>Parents</option>
          <option value="Teachers" <?php if ($rel=="Teachers") { ?>selected="selected" <?php } ?>>Teachers</option>
        </select>        </td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="19">&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <?php
	  
		$month=substr($dt1,5,2);
		$year=substr($dt1,0,4);
		$day=substr($dt1,8,2);
	 $dy=$day."-".$month."-".$year;
?>
      <tr>
        <td height="25">&nbsp;</td>
        <td><div align="right"><strong>Commented Date <span class="style1">*</span></strong> </div></td>
        <td colspan="3"><input type="text" name="txtDy" id="txtDy" value="<?php echo $dy; ?>">
        <a href="#" onClick="setYears(1985, 2012);
       showCalender(this, 'txtDy');">
      <img src="../calander/calender.png" width="24" height="20"></a>

    <!-- Calender Script  --> 

    <table id="calenderTable">
        <tbody id="calenderTableHead">
          <tr>
            <td colspan="4" align="center">
	          <select onChange="showCalenderBody(createCalender(document.getElementById('selectYear').value,
	           this.selectedIndex, false));" id="selectMonth">
	              <option value="0">Jan</option>
	              <option value="1">Feb</option>
	              <option value="2">Mar</option>
	              <option value="3">Apr</option>
	              <option value="4">May</option>
	              <option value="5">Jun</option>
	              <option value="6">Jul</option>
	              <option value="7">Aug</option>
	              <option value="8">Sep</option>
	              <option value="9">Oct</option>
	              <option value="10">Nov</option>
	              <option value="11">Dec</option>
	          </select>
            </td>
            <td colspan="2" align="center">
			    <select onChange="showCalenderBody(createCalender(this.value,document.getElementById('selectMonth').selectedIndex, false));" id="selectYear">
				</select>
			</td>
            <td align="center">
			    <a href="#" onClick="closeCalender();"><font color="#003333" size="+1">X</font></a>
			</td>
		  </tr>
       </tbody>
       <tbody id="calenderTableDays">
         <tr style="">
           <td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td><td>Thu</td><td>Fri</td><td>Sat</td>
         </tr>
       </tbody>
       <tbody id="calender"></tbody>
    </table>

<!-- End Calender Script  --></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="19">&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="25">&nbsp;</td>
        <td><div align="right"><strong>Feedback <span class="style1">*</span> </strong></div></td>
        <td colspan="3"><textarea name="txtFeed" rows="5" id="txtFeed"><?php echo $feed; ?></textarea></textarea></td>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="19">&nbsp;</td>
        <td>&nbsp;</td>
        <td colspan="3"><div id="ajaxDiv" class="error_strings"></div></td>
        <td>&nbsp;</td>
      </tr>
	  </Form>
      
      <tr>
        <td height="25">&nbsp;</td>
        <td>&nbsp;</td>
        <td width="66"><input type="submit" name="Submit" value="Save" onClick="validate()"></td>
        <td width="106"><input type="reset" name="Submit2" value="Back" onClick="backx()"> </td>
        <td width="127">&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </table></td>
	
	</tr>
	
	<tr>
		<td>
			<img src="../images/3.gif" width="800" height="40" alt=""></td>
	</tr>
</table>

<!-- End ImageReady Slices -->
</body>
</html>